-- GENERATED SPELL FOR [Anub'ar Necromancer] --


function spell0_29119(pUnit, Event) --@Animate Bones,Self--
pUnit:FullCastSpellOnTarget(53334,pUnit)
pUnit:RegisterEvent('Sorts_29119', 9000, 1)
end

function spell1_29119(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(53333,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_29119', 2000, 1)
end

function Sorts_29119(pUnit, Event)
local choix_sorts_29119 = math.random(0, 1)
if choix_sorts_29119 == 0 then
pUnit:RegisterEvent('spell0_29119', 1, 1)
end
if choix_sorts_29119 == 1 then
pUnit:RegisterEvent('spell1_29119', 1, 1)
end
end

function mob29119_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_29119', math.random(1500, 3000), 1)
end

function mob29119_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29119_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob29119_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(29119, 1, 'mob29119_Action')
RegisterUnitEvent(29119, 2, 'mob29119_Leave')
RegisterUnitEvent(29119, 3, 'mob29119_Kill')
RegisterUnitEvent(29119, 4, 'mob29119_Die')
